﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="Trangchu.aspx.cs" Inherits="NCKH.Trangchu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 <style type="text/css">
        .centar {
           text-align:center;
        }
        .right {
        text-align:right;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <asp:GridView ID="grvtinoibat" runat="server" BorderColor="#ffffff" 
         OnRowCommand="grvtinoibat_RowCommand" AllowPaging="true" PageSize="1" OnPageIndexChanging="grvtinoibat_PageIndexChanging"
        AutoGenerateColumns="false" Width="500px"
         OnSelectedIndexChanged="grvtinoibat_SelectedIndexChanged1">
        <Columns>
            <asp:TemplateField >
                <ItemStyle HorizontalAlign="Left" />
                <ItemTemplate>
                    <a href='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'>
                        <asp:Image ID="imgnoibat" runat="server" ImageUrl='<%# Eval("Image") %>' Width="250px" Height="250px" 
                            DescriptionUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' />
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField ItemStyle-Height="300px" >
                <ItemStyle HorizontalAlign="Justify" />
                <ItemTemplate>
                    <h3><asp:HyperLink ID="tieudenoibat" runat="server" 
                        NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' Text='<%# Eval("Tieude") %>'></asp:HyperLink></h3>
                    '<%# Eval("Ngaytao") %>'
                    <br />
                    '<%# Eval("Tomtat") %>'
                    <br />
                   ><asp:HyperLink ID="tin2" runat="server" Text='<%# Eval("Tieude") %>' NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'></asp:HyperLink>
                    <br />
                    ><asp:HyperLink ID="tin3" runat="server" Text='<%# Eval("Tieude") %>' NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:GridView ID="grvtin2" runat="server" 
        AllowPaging="true" PageSize="1"  BorderColor="#ffffff" BorderWidth="20px"
        AutoGenerateColumns="false" OnSelectedIndexChanging="grvtin2_SelectedIndexChanging"
             OnPageIndexChanging="grvtin2_PageIndexChanging">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'>
                    <asp:Image ID="imgtin2" runat="server"  Width="150px" Height="150px"
                        DescriptionUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' 
                        ImageUrl='<%# Eval("Image") %>' />
                        </a>
                    <asp:HyperLink ID="tieudenoibat1" runat="server" 
                        NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' 
                        Text='<%# Eval("Tieude") %>' ></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'>
                    <asp:Image ID="imgtin3" runat="server" Width="150px" Height="150px" 
                        DescriptionUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' ImageUrl='<%# Eval("Image") %>' />
                        </a>
                    <asp:HyperLink ID="tieudenoibat2" runat="server" 
                        NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' 
                        Text='<%# Eval("Tieude") %>' ></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'>
                    <asp:Image ID="imgtin4" runat="server" Width="150px" Height="150px" 
                        DescriptionUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' ImageUrl='<%# Eval("Image") %>' />
                        </a>
                    <asp:HyperLink ID="tieudenoibat3" runat="server" 
                        NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>' 
                        Text='<%# Eval("Tieude") %>' ></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:GridView ID="grvtin" runat="server" 
    AutoGenerateColumns="false" HorizontalAlign="Center" BorderColor="#ffffff"
     OnRowCommand="grvtin_RowCommand"
     AllowPaging="true" PageSize="5"
         OnPageIndexChanging="grvtin_PageIndexChanging"
         Width="500px">
    <Columns>     
        <asp:TemplateField>
            <ItemTemplate>
                <a href='<%# Eval("Image") %>'><asp:Image ID="Image" runat="server" ImageUrl='<%# Eval("Image") %>' Width="100px" Height="100px" /></a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemStyle HorizontalAlign="Justify" />            
            <ItemTemplate>
                <h3><asp:Label ID="tieude" runat="server" Text='<%# Eval("Tieude") %>' Width="400px" Height="30px" CssClass="centar" ></asp:Label></h3>
                    <br />
                    <i><%# Eval("Tomtat") %></i>  
                <br />               
                <asp:HyperLink ID="tiep" runat="server" CssClass="right" Text="Xem tiếp..." NavigateUrl='<%# Eval("Manoidungtin","/noidungtin.aspx?id={0}") %>'></asp:HyperLink>
            </ItemTemplate>
             </asp:TemplateField>
    </Columns>
</asp:GridView>
</asp:Content>
